﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskStatus = Reborn.Contracts.State.TaskStatus;

namespace SimpleSpider.Framework.Model
{

    [SugarTable("start_url")]
    public class StartUrlModel
    {
        /// <summary>
        /// id
        /// </summary>
        [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]

        public int Id { get; set; }

        /// <summary>
        /// 网址
        /// </summary>
        [SugarColumn(ColumnName = "url", ColumnDescription = "网址")]
        public string Url { get; set; }

        /// <summary>
        /// 唯一标识
        /// </summary>
        [SugarColumn(ColumnName = "unique_id", ColumnDescription = "唯一标识")]
        public string UniqueId { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnName = "status", ColumnDescription = "状态")]
        public TaskStatus Status { get; set; }

        /// <summary>
        /// 使用次数
        /// </summary>
        [SugarColumn(ColumnName = "use_number", ColumnDescription = "使用次数")]
        public int UseNumber { get; set; }

        /// <summary>
        ///  创建时间
        /// </summary>

        [SugarColumn(ColumnName = "create_time", ColumnDescription = "创建时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>

        [SugarColumn(ColumnName = "UpdateTime", ColumnDescription = "更新时间")]
        public DateTime UpdateTime { get; set; } = new DateTime();
    }
}
